﻿@using System.Data
@using ZoomLa.Common
@using ZoomLa.BLL
@model ZoomLa.SQLDAL.SQL.PageSetting
@{
    Model.cols = 4;
    Model.url = "/Guest/Cate_Data?cateid=" + Request["cateid"];
}
@functions{
    public string GetTitle(object status, object title)
    {
        if (status.ToString().Equals("0"))
        {
            return "<span style='color:gray;'>" + title + "[未审核]</span>";
        }
        else
        {
            return title.ToString();
        }
    }
    public string GetUName(object honeyname, object username)
    {
        string name = B_User.GetUserName(honeyname.ToString(), username.ToString());
        return string.IsNullOrEmpty(name) ? "游客" : name;
    }
}
<div id="EGV" class="container">
    <table id="egv_tb" class="table table-striped table-bordered table-hover guest_hometable">
        <tr>
            <td style="width:40px;"></td>
            <td style="width:80%;">版块主题</td>
            <td style="width:30px;"></td>
            <td></td>
        </tr>
        @if (Model.itemCount > 0)
        {
            foreach (DataRow dr in Model.dt.Rows)
            {
                <tr onclick="location='/Guest/GuestShow?GID=@dr["GID"]';">
                    <td class="text-center"><i class="fa fa-file" style="color:#06c"></i></td>
                    <td>
                        <a href="/Guest/Default?CateID=@dr["CateID"]" style="color:#007CD5">[@dr["CateName"]]</a>
                        <a href="/Guest/GuestShow?GID=@dr["GID"]" class="post_title" title="点击浏览">@MvcHtmlString.Create(GetTitle(dr["Status"], dr["Title"]))</a>
                    </td>
                    <td><img src="@dr["UserFace"]" onerror="shownoface(this);" class="img_xs" /></td>
                    <td>
                        <div class="r_graw">@GetUName(dr["HoneyName"], dr["UserName"])</div>
                        <div class="r_graw">@DataConverter.CDate(dr["GDate"]).ToString("yyyy-MM-dd hh:mm")</div>
                    </td>
                </tr>
            }
        }
    </table>
    @if (Model.itemCount > 0)
    {
        <div class="text-center">@Html.Partial("_page2", Model)</div>
    }
</div>
